#!/usr/bin/env ruby
require 'github_favorite_language'

if ARGV.empty? && $stdin.tty?
  GithubFavoriteLanguage.print_usage
else
  username = ARGV.first || STDIN.read
  puts GithubFavoriteLanguage.new(username: username).print_favorite_language
end
